<template>
  <basic-container>
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane label="系统参数" name="app">
        <config ref="config" :category="activeName" />
      </el-tab-pane>
      <el-tab-pane label="配置管理" name="second">
        <config ref="config" :category="activeName" />
      </el-tab-pane>
      <el-tab-pane label="角色管理" name="third">
        <config ref="config" :category="activeName" />
      </el-tab-pane>
      <el-tab-pane label="定时任务补偿" name="fourth">
        <config ref="config" :category="activeName" />
      </el-tab-pane>
      <el-tab-pane label="全部" name="all">
        <config ref="config" :category="activeName" />
      </el-tab-pane>
    </el-tabs>
  </basic-container>
</template>

<script>
import Config from "./config";

export default {
  components: { Config },
  data() {
    return {
      activeName: "app",
    };
  },
  methods: {
    handleClick(tab, event) {
      // console.log(tab, event);
      this.activeName = tab.name;
      this.$refs.config.rowLoad();
    },
  },
};
</script>
